<html>
	<head>
		<title>手工审票</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
		<link href="../../css/general1.css" rel="stylesheet" type="text/css" />
		<link href="style/css.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../../script/hiawardbpm.js"></script>
		<script type="text/javascript" src="../../script/prototype.js"></script>
		<script type="text/javascript">
        function subForm(){
          var webData=buildWebData();
          var xmlMsg=window.dialogArguments;
          alert(xmlMsg.getXmlDocument().xml);
          xmlMsg.setCommand(12);
          xmlMsg.setWebData(webData);
          xmlMsg.buildXML();
          var url="/vchzms-hiaward/ProcessAjaxHandler";
          alert(xmlMsg.getXmlDocument().xml);
          new Ajax.Request(url,{
          method:'post',
          postBody:xmlMsg.getXmlDocument().xml,
          contentType:'application/x-www-form-urlencoded',
          encoding:'UTF-8',
          onComplete:function(transport){
	          try{
		          if(200==transport.status){
		               alert('操作成功');
		               
		               window.close();
		              }
		          if(400==transport.status){
		               alert('创建失败');
		              }
	          }catch(err){
	              alert('js异常');
	          }
          }
       });
         }
         function buildWebData(){
          var webData=new WebData();
          var accno=document.getElementById("accno").value;
          var amount=document.getElementById("amount").value;
          var vchno=document.getElementById("vchno").value;
          var subno=document.getElementById("subno").value;
          var brbank=document.getElementById("brbank").value;
          var vsbank=document.getElementById("vsbank").value;
          var auditResults=document.getElementsByName("auditResult");
          for(var i=0;i<auditResults.length;i++){
            if(auditResults[i].checked){
             var auditResult=auditResults[i].value;
            }
          }
          webData.setProperty('auditResult',auditResult);
          webData.setProperty('accnoInput',accno);
          webData.setProperty('amountInput',amount);
          webData.setProperty('vchnoInput',vchno);
          webData.setProperty('subnoInput',subno);
          webData.setProperty('brbankInput',brbank);
          webData.setProperty('vsbankInput',vsbank);
          return webData;
         }
    </script>
	</head>

	<body>
	      <table class="font3" bgcolor="#6699FF">
			<tr>
				<td>
					<img src="pic/00000001.jpg">
				</td>
				<td width="200">
					<table class="font3" bgcolor="#6699FF" width="200">
						<tr>
							<td>
								帐号&nbsp;&nbsp;
								<input type="text" id="accno" name="accno" />
							</td>
						</tr>
						<tr>
							<td>
								金额&nbsp;&nbsp;
								<input type="text" id="amount" name="amount" />
							</td>
						</tr>
						<tr>
							<td>
								凭证号
								<input type="text" id="vchno" name="vchno" />
							</td>
						</tr>
						<tr>
							<td>
								分行号
								<input type="text" id="subno" name="subno" />
							</td>
						</tr>
						<tr>
							<td>
								提入行
								<input type="text" id="brbank" name="brbank" />
							</td>
						</tr>
						<tr>
							<td>
								提出行
								<input type="text" id="vsbank" name="vsbank" />
							</td>
						</tr>
						<tr>
							<td>
								
								<input type="radio" id="auditResult" name="auditResult"
									value="2">审票不通过
								<input type="radio" id="auditResult" name="auditResult"
									value="1">审票通过
							</td>
						</tr>
                        <tr>
                          <td><input type="button" name="button" value="提交" onclick="subForm()" /></td>
                        </tr>
					</table>
				</td>
			</tr>
		</table>	
	</body>
	<script type="text/javascript">
	  var xmlMsg=window.dialogArguments;
	  var accnoTemp=xmlMsg.getWebData().getProperty('accno');
	  var amountTemp=xmlMsg.getWebData().getProperty('amount');
	  var vchnoTemp=xmlMsg.getWebData().getProperty('vchno');
	  var subnoTemp=xmlMsg.getWebData().getProperty('subno');
	  var brbankTemp=xmlMsg.getWebData().getProperty('brbank');
	  var vsbankTemp=xmlMsg.getWebData().getProperty('vsbank');
	  document.getElementById("accno").value=accnoTemp;
	  document.getElementById("amount").value=amountTemp;
	  document.getElementById("vchno").value=vchnoTemp;
	  document.getElementById("subno").value=subnoTemp;
	  document.getElementById("brbank").value=brbankTemp;
	  document.getElementById("vsbank").value=vsbankTemp;
	</script>
</html>
